﻿using System;
using System.ComponentModel;
using System.Windows;

namespace Com.Lancetinc.Evs.Controls
{
    /// <summary>
    /// CameraPropLowlightCompensationSettingUserControl.xaml 的交互逻辑
    /// </summary>
    public partial class CameraPropLowlightCompensationSettingUserControl
    {
        public CameraPropLowlightCompensationSettingUserControl()
        {
            InitializeComponent();
        }

        protected override void OnCameraPropChange(PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "CameraPropValue")
            {
                if (cameraPropViewModel.CameraPropValue == 1)
                {
                    RadioOn.IsChecked = true;
                }
                else
                {
                    RadioOff.IsChecked = true;
                }
            }
        }

        private void RadioOn_Checked(object sender, RoutedEventArgs e)
        {
            cameraPropViewModel.CameraPropValue = 1;
        }

        private void RadioOff_Checked(object sender, RoutedEventArgs e)
        {
            cameraPropViewModel.CameraPropValue = 0;
        }
    }
}
